package cn.circle.system.pagemodel;

import java.util.Date;
import java.util.Set;

/**
 * 保存登录用户信息
 * 
 * 
 */
public class LoginInfo implements java.io.Serializable {

	private static final long serialVersionUID = -8725360654758092775L;
	private Integer custId; // 用户编号
	private Integer depId; // 用户所在单位或部门
	private Integer roleIds; // 用户角色编号
	private Integer sex; // 用户角色编号
	private String roleName; // 用户角色名称
	private String userName; // 用户姓名
	private String ip; // 用户登录的IP地址
	private Long loginTime = System.currentTimeMillis();
	private Set<String> moduleIds; // 用户可操作的模块ID号
	private String photo; // 用户头像
	private Date lastLoginTime;	//上次登录
	private String phone;	//
	private String depName;	//


	public LoginInfo() {
	}

	public LoginInfo(Integer custId,String depName,String roleName, Integer depId, Integer roleIds,  String userName, String photo, String ip,Date lastLoginTime,String phone,Integer sex,
			Long loginTime) {
		super();
		this.custId = custId;
		this.depId = depId;
		this.roleIds = roleIds;
		this.roleName = roleName;
		this.depName = depName;
		this.userName = userName;
		this.photo = photo;
		this.lastLoginTime = lastLoginTime;
		this.phone = phone;
		this.sex = sex;
		this.ip = ip;
		if (loginTime != null)
			this.loginTime = loginTime;
	}

	public static LoginInfo Init() {
		return new LoginInfo();
	}

	public Integer getCustId() {
		return custId;
	}

	public void setCustId(Integer custId) {
		this.custId = custId;
	}

	public Integer getDepId() {
		return depId;
	}

	public void setDepId(Integer depId) {
		this.depId = depId;
	}

	public Integer getRoleId() {
		return roleIds;
	}

	public void setRoleId(Integer roleIds) {
		this.roleIds = roleIds;
	}

//	public String getRoleName() {
//		return roleName;
//	}
//
//	public void setRoleName(String roleName) {
//		this.roleName = roleName;
//	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public Long getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Long loginTime) {
		this.loginTime = loginTime;
	}

	public Set<String> getModuleIds() {
		return moduleIds;
	}

	public void setModuleIds(Set<String> moduleIds) {
		this.moduleIds = moduleIds;
	}
	
	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}
	
	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}
	
	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getDepName() {
		return depName;
	}

	public void setDepName(String depName) {
		this.depName = depName;
	}
	
}
